﻿using System.Text;

namespace RaGE
{
    internal class EQuestion
    {
        public int QuestionID;
        public int Control;
        public int QuestionTextLength;
        public byte[] QuestionText;
        public int ChoiceQount;
        public EChoice[] Choices;

        public string GetText()
        {
            var encoding = Encoding.GetEncoding("Unicode");
            return encoding.GetString(QuestionText);
        }

        public void SetText(string value)
        {
            var encoding = Encoding.GetEncoding("Unicode");
            QuestionText = encoding.GetBytes(value + '\0');
            QuestionTextLength = QuestionText.Length / 2;
        }
    }
}
